package com.jjlin.chapter_8;
import java.util.Scanner;

public class CD36{
    public static void swap(int[] arr, int i, int j){
        int tmp = arr[i];
        arr[i] = arr[j];
        arr[j] = tmp;
    }

    public static void sort(int[] arr){
        if(arr == null || arr.length < 2)
            return;
        int pre = 0;
        int cur = 1;
        while(cur < arr.length){
            if(arr[cur++] != arr[pre])
                swap(arr, ++pre, cur - 1);
        }
    }

    public static void printArray(int[] arr, int len){
        for(int i = 0; i < len - 1; i++)
            System.out.print(arr[i] + " ");
        System.out.println(arr[len - 1]);
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        int[] arr = new int[count];
        for(int i = 0; i < count; i++)
            arr[i] = sc.nextInt();
        sort(arr);
        printArray(arr, arr.length);
    }
}
